﻿//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2020 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------

using GameFramework;

public static class AssetUtility
{
    public static string GetConfigAsset(string assetName, bool fromBytes = false)
    {
        return Utility.Text.Format("Assets/Configs/{0}.{1}", assetName, fromBytes ? "bytes" : "txt");
    }

    public static string GetDataTableAsset(string assetName, bool fromBytes = true)
    {
        return Utility.Text.Format("Assets/DataTables/{0}.{1}", assetName, fromBytes ? "bytes" : "txt");
    }

    public static string GetDictionaryAsset(string assetName, bool fromBytes = false)
    {
        return Utility.Text.Format("Assets/Localization/{0}/Dictionaries/{1}.{2}", GameEntry.Localization.Language.ToString(), assetName, fromBytes ? "bytes" : "json");
    }

    public static string GetFontAsset(string assetName)
    {
        return Utility.Text.Format("Assets/Fonts/{0}.ttf", assetName);
    }

    public static string GetSceneAsset(string assetName1, string assetName2)
    {
        return Utility.Text.Format("Assets/Scenes/{0}/{1}.unity", assetName1, assetName2);
    }
    public static string GetSceneAsset(string assetName)
    {
        return Utility.Text.Format("Assets/Scenes/{0}.unity", assetName);
    }
    public static string GetMusicAsset(string assetName)
    {
        return Utility.Text.Format("Assets/Music/{0}.mp3", assetName);
    }

    public static string GetSoundAsset(string assetName)
    {
        return Utility.Text.Format("Assets/Sounds/{0}.wav", assetName);
    }

    public static string GetEntityAsset(string assetName)
    {
        return Utility.Text.Format("Assets/Entity/{0}.prefab", assetName);
    }

    public static string GetUIFormAsset(string assetName)
    {
        return Utility.Text.Format("Assets/UI/UIForms/{0}.prefab", assetName);
    }

    public static string GetUISoundAsset(string assetName)
    {
        return Utility.Text.Format("Assets/UI/UISounds/{0}.wav", assetName);
    }
}
